#ifndef tool_point_h
#define tool_point_h

#import "tool.h"

/*compute two point distance
*/
float ptPointDistance_CGPoint(CGPoint Point1, CGPoint Point2);
float ptPointDistance_b2Vec2(b2Vec2 Point1, b2Vec2 Point2);

b2Vec2 ptRotatePoint_b2Vec2(b2Vec2 In, float Degree);
CGPoint ptRotatePoint_CGPoint(CGPoint In, float Degree);

/*convert data type between cocos2d and box2d
*/
b2Vec2 ptConvertCGPoint(CGPoint Point);
b2Vec2 ptConvertCGSize(CGSize Size);
CGPoint ptConvertb2Vec2ToCGPoint(b2Vec2 In);
CGSize ptConvertb2Vec2ToCGSize(b2Vec2 In);

/*scale point and vector
*/
CGPoint ptScalePoint_same(CGPoint Point, float Ratio);
CGPoint ptScalePoint_diff(CGPoint Point, float RatioX, float RatioY);
b2Vec2 ptScaleVector_same(b2Vec2 Vector, float Ratio);
b2Vec2 ptScaleVector_diff(b2Vec2 Vector, float RatioX, float RatioY);

/*create collision table vertex, remenber to delete pointer
*/
b2Vec2 *ptCreateCollisionVertex(std::vector<CGPoint> *Table);

#endif